package com.oracle.controller;

import com.oracle.javaee.business.HelloLocal;
import com.oracle.javaee.business.StatusLocal;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 */
@ManagedBean(name="controller")
@SessionScoped
public class Controller {
    private String username = "N/A";
    @EJB HelloLocal hello;
    @EJB StatusLocal status;

    /**
     *
     */
    public Controller() {
    }

    /**
     *
     */
    public String getMessage() {
        return hello.sayHello() + " - " + getUsername() + " - " + status.getCounter();
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    
}
